home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / comm / cnet / cnet_pager.lha / PagerUpdate < prev   
Text File  |  1998-03-15  |  2KB  |  51 lines

  1. /**************************************************************************\
  2.       $VER: CNet Amiga Pager Update, v5.20 (15-Mar-98) by Dotoran!
  3. \**************************************************************************/
  4. options results;signal on SYNTAX;signal on ERROR;signal on IOERR
  5. a=sourceline(2);parse var a . ", "ver" ("vdate")" .;a=random(,,time("s"))
  6. tr=transmit;se=sendstring;gc=getchar;gu=getuser;gs=getscratch;mg=maygetchar
  7. a="rexxsupport.library";if ~show("l",a) then if ~addlib(a,0,-30) then exit
  8. parse source . . fp .;df=left(fp,max(lastpos('/',fp),lastpos(':',fp)))
  9.  
  10. if ~exists(df"PagerConfigF") then do
  11.   se "n1   I could NOT locate your `PagerConfigF' file in the `"df"' path. "
  12.   tr "This update file must be run from INSIDE your `Pager/' directory!"
  13.   exit;end
  14.  
  15. tr "n1CNet Amiga Pager Update, "ver"n1"
  16.  
  17. se "   This file will convert the CTRL-A characters used in your existing "
  18. se "`PagerConfigF' file into | characters, so that it can be more easily "
  19. tr "read using text editors like CED.n1"
  20.  
  21. tr "Press any key to convert the file...g1"
  22.  
  23. call open(f1,df"PagerConfigF","r")
  24.   do i=1 until eof(f1) ; l.i=readln(f1) ; end ; t=i-1
  25. call close(f1)
  26.  
  27. if index(l.1,d2c(1))=0 then do
  28.   se "n1   The file looks to have already been converted. Are you sure you "
  29.   se "either did not run this file earlier, or perhaps you copied the "
  30.   se "`PagerConfigF' file that came in this new archive? If the latter, "
  31.   tr "be sure to use the SYS C command to re-enter your previous values!"
  32.   exit;end
  33.  
  34. call open(f1,df"PagerConfigF","w")
  35.   do i=1 to t ; call writeln(f1,translate(l.i,"|",d2c(1))) ; end i
  36. call close(f1)
  37.  
  38. tr "n1CNet Amiga Pager Update is complete!"
  39.  
  40. exit
  41. CHECK:;if ARG() & ARG(1)~="###PANIC" then return ARG(1)
  42.   getcarrier;if result="TRUE" then if ARG() then return ARG(1);else return
  43.   logentry "Lost Carrier!!";bufferflush;exit
  44. SYNTAX:;ERROR:;IOERR:;e1="n1 Error: "rc" ("errortext(rc)")"
  45.   e2="  Line: "left(sigl,4)"File:";c="`"fp", "ver"'";e2=e2" "c;tr e1;tr e2
  46.   logentry e1;logentry e2;e=strip(translate(sourceline(sigl),"\{",""))
  47.   do while e~="";e3="Source: "left(e,37);tr e3;logentry e3;e=substr(e,38);end
  48.   bufferflush
  49. /**************************************************************************\
  50. \****************************************** Frontiers BBS (716)/823-9892 **/
  51.